package com.itheima.demo3;

import java.sql.SQLOutput;
import java.util.Objects;

public class MyObjectsDemo {
    public static void main(String[] args) {
        Student stu = new Student("小罗", 50);
        System.out.println(Objects.toString(stu));

        Student s = new Student("小花", 25);
        Student ss = null;
        System.out.println(Objects.toString(s, "随便写一个"));
        System.out.println(Objects.toString(ss, "随便写一个"));

        Student s1 = null;
        System.out.println(Objects.isNull(s1));
        Student s2 = new Student();
        System.out.println(Objects.isNull(s2));

        Student s3 = new Student();
        System.out.println(Objects.nonNull(s3));
        Student s4 = null;
        System.out.println(Objects.nonNull(s4));
    }
}
